liebs-picker-grid-modal,
liebs-picker-zoom-modal {
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    right: 0px;
    z-index: 10000;

    color: #fff;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    
    display: flex;
    flex-flow: column nowrap;
}

liebs-picker-grid-modal:focus,
liebs-picker-zoom-modal:focus {
    outline: none;
}

liebs-picker-grid-modal header,
liebs-picker-zoom-modal header {
    width: 100%;
    margin-bottom: 20px;

    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
}

liebs-picker-grid-modal h1,
liebs-picker-zoom-modal h1 {
    font-size: 16px;
    flex-grow: 0;
}

liebs-picker-zoom-modal h1 + span {
    padding-left: 20px;
    font-size: 16px;
    color: #999;
    flex-grow: 1;
}

liebs-picker-zoom-modal header > div:last-child {
    display: flex;
    flex-flow: row wrap;
}

liebs-picker-zoom-modal header > div:last-child > div:not(:last-child) {
    margin-right: 40px;
}

liebs-picker-grid-modal header button,
liebs-picker-zoom-modal header button {
    min-width: 100px;
    max-width: 180px;
    height: 36px;
    vertical-align: center;
}

liebs-picker-grid-modal header button:disabled,
liebs-picker-zoom-modal header button:disabled {
    opacity: var(--p-disabled-opacity);
    cursor: not-allowed;
}

liebs-picker-grid-modal content,
liebs-picker-zoom-modal content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;

    display: flex;
    justify-content: center;    
    align-items: center;
}

liebs-picker-grid-modal.first-layout content,
liebs-picker-zoom-modal.first-layout content {
    opacity: 0;
}

liebs-picker-grid-modal .image-list {
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;

    display: grid;
    justify-content: space-evenly;    
    align-items: center;
}

liebs-picker-zoom-modal header .first-button {
    width: 40px;
}
liebs-picker-zoom-modal header .last-button {
    width: 40px;
}
liebs-picker-zoom-modal header .prev-button {
    transform: scale(-1, 1)
}

liebs-picker-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

liebs-picker-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 4px;
}

liebs-picker-image .overlay {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 4px;    
    pointer-events: none;
}

liebs-picker-image:focus {
    outline: none;
}

liebs-picker-image:focus .overlay {    
    border: 2px solid #0cf;
}

liebs-picker-image:hover .overlay {
    box-shadow: inset 0 0 20px 4px #fff;
}

liebs-picker-image[data-selected="yes"] .overlay {
    box-shadow: inset 0 0 20px 4px #090;
}

liebs-picker-image[data-selected="yes"]:hover .overlay {
    box-shadow: inset 0 0 20px 4px #0F0;
}

liebs-picker-image[data-unwanted="yes"] img {
    filter: grayscale(1) brightness(0.1);
}

liebs-picker-image[data-unwanted="yes"]:hover .overlay {
    box-shadow: none !important;
}

liebs-picker-image .actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: 1s opacity ease-out;

    color: #000;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 4px;
}

liebs-picker-image[data-unwanted="yes"] .actions {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

liebs-picker-image .actions:hover {
    opacity: 0.8;
    transition-duration: 250ms;
}

liebs-picker-image .actions button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 38px;    
    background: none;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}
